package com.wwwarehouse.taskcenter.bean.job_point;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * author ：minifly
 * date: 2017/10/28
 * time: 14:38
 * desc:
 */
public class AddJobPointStep6ResponseBean implements Parcelable {


    /**
     * list : [{"businessUnitId":20170922,"businessUnitName":"规划业务"},{"businessUnitName":"undefined"},{"businessUnitName":"undefined"},{"businessUnitName":"undefined"},{"businessUnitName":"undefined"},{"businessUnitName":"undefined"},{"businessUnitName":"undefined"},{"businessUnitName":"undefined"},{"businessUnitName":"undefined"},{"businessUnitId":20170922,"businessUnitName":"undefined"}]
     * page : 1
     * size : 10
     * total : 183
     */

    private int page;
    private int size;
    private int total;
    private ArrayList<ListBean> list;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public ArrayList<ListBean> getList() {
        return list;
    }

    public void setList(ArrayList<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements Parcelable {
        public String getBusinessUnitId() {
            return businessUnitId;
        }

        public void setBusinessUnitId(String businessUnitId) {
            this.businessUnitId = businessUnitId;
        }

        /**
         * businessUnitId : 20170922
         * businessUnitName : 规划业务
         */

        private String businessUnitId;
        private String businessUnitName;
        private boolean isClick;

        public String getBusinessUnitName() {
            return businessUnitName;
        }

        public void setBusinessUnitName(String businessUnitName) {
            this.businessUnitName = businessUnitName;
        }

        public boolean isClick() {
            return isClick;
        }

        public void setClick(boolean click) {
            isClick = click;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.businessUnitId);
            dest.writeString(this.businessUnitName);
            dest.writeByte(this.isClick ? (byte) 1 : (byte) 0);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.businessUnitId = in.readString();
            this.businessUnitName = in.readString();
            this.isClick = in.readByte() != 0;
        }

        public static final Parcelable.Creator<ListBean> CREATOR = new Parcelable.Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.page);
        dest.writeInt(this.size);
        dest.writeInt(this.total);
        dest.writeTypedList(this.list);
    }

    public AddJobPointStep6ResponseBean() {
    }

    protected AddJobPointStep6ResponseBean(Parcel in) {
        this.page = in.readInt();
        this.size = in.readInt();
        this.total = in.readInt();
        this.list = in.createTypedArrayList(ListBean.CREATOR);
    }

    public static final Parcelable.Creator<AddJobPointStep6ResponseBean> CREATOR = new Parcelable.Creator<AddJobPointStep6ResponseBean>() {
        @Override
        public AddJobPointStep6ResponseBean createFromParcel(Parcel source) {
            return new AddJobPointStep6ResponseBean(source);
        }

        @Override
        public AddJobPointStep6ResponseBean[] newArray(int size) {
            return new AddJobPointStep6ResponseBean[size];
        }
    };
}
